﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace SwtorCalculator.CustomControls.TalentTrees {
    /// <summary>
    /// Interaction logic for Si_Assassin.xaml
    /// </summary>
    public partial class Si_Assassin : UserControl {
        //private int remaining = 100;
        //private ToolTip tTip = new ToolTip();
        //private AssassinTalents sa = new AssassinTalents();
        //private SolidColorBrush greenBrush = new SolidColorBrush( Colors.Green );
        //private SolidColorBrush grayBrush = new SolidColorBrush( Colors.Gray );

        public Si_Assassin() {
        //    InitializeComponent();
        //    ToolTipService.SetShowDuration( tTip, 10000 );
        //    tTip.MaxWidth = 400;
        }

        ///// <summary>
        ///// Makes sure that the _player variable is initialized
        ///// </summary>
        //private void setClass() {
        //    //si = ( Assassin )MainWindow._player;
        //}

        ///// <summary>
        ///// Quick way to assign tooltips
        ///// </summary>
        ///// <param name="lbl">Label to attach tooltip to</param>
        ///// <param name="tip">Tooltip text</param>
        //private void setTip( Label lbl, String tip ) {
        //    tTip.Content = tip;
        //    lbl.ToolTip = tTip;
        //}

        ///// <summary>
        ///// Quick method to increase the number of talents points
        ///// spent in a specific talent
        ///// </summary>
        ///// <param name="lbl">Talent's label</param>
        ///// <param name="current">Current points in a talent</param>
        ///// <param name="max">Max talents points allowed in a talent</param>
        ///// <returns>New current talent points</returns>
        //private int increasePts( Label lbl, int current, int max ) {
        //    if( current + 1 <= max && remaining > 0 ) {
        //        current += 1;
        //        remaining--;
        //        lbl.Content = current + "/" + max;
        //        lblRemaining.Content = remaining;
        //    }

        //    if( current > 0 )
        //        lbl.Foreground = greenBrush;

        //    return current;
        //}

        ///// <summary>
        ///// Quick method to decrease the number of talents points
        ///// spent in a specific talent
        ///// </summary>
        ///// <param name="lbl">Talent's label</param>
        ///// <param name="current">Current points in a talent</param>
        ///// <param name="max">Max talents points allowed in a talent</param>
        ///// <returns>New current talent points</returns>
        //private int decreasePts( Label lbl, int current, int max ) {
        //    if( current - 1 >= 0 ) {
        //        current -= 1;
        //        remaining++;
        //        lbl.Content = current + "/" + max;
        //        lblRemaining.Content = remaining;
        //    }

        //    if( current == 0 )
        //        lbl.Foreground = grayBrush;

        //    return current;
        //}

        //private void onMouseEnter( object sender, MouseEventArgs e ) {
        //    string tt = String.Empty;

        //    setClass();

        //    if( e.Source == lblTorment )
        //        tt = sa.TormentTooltip;
        //    else if( e.Source == lblHauntingPres )
        //        tt = sa.HauntingPresenceTooltip;
        //    else if( e.Source == lblExploitStrike )
        //        tt = sa.ExploitiveStrikesTooltip;
        //    else if( e.Source == lblChainShock )
        //        tt = sa.ChainShockTooltip;
        //    else if( e.Source == lblExploitStrike )
        //        tt = sa.ExploitiveStrikesTooltip;
        //    else if( e.Source == lblChainShock )
        //        tt = sa.ChainShockTooltip;
        //    else if( e.Source == lblSithEff )
        //        tt = sa.SithEfficacyTooltip;
        //    else if( e.Source == lblParasite )
        //        tt = sa.ParasitismTooltip;
        //    else if( e.Source == lblOpress )
        //        tt = sa.OpressingForceTooltip;
        //    else if( e.Source == lblMadness )
        //        tt = sa.MadnessTooltip;
        //    else if( e.Source == lblDeathfield )
        //        tt = sa.DeathFieldTooltip;
        //    else if( e.Source == lblClawDecay )
        //        tt = sa.ClawsOfDecayTooltip;
        //    else if( e.Source == lblUnearthed )
        //        tt = sa.UnearthedKnowledgeTooltip;
        //    else if( e.Source == lblWrath )
        //        tt = sa.WrathTooltip;
        //    else if( e.Source == lblRaze )
        //        tt = sa.RazeTooltip;
        //    else if( e.Source == lblDevour )
        //        tt = sa.DevourTooltip;
        //    else if( e.Source == lblCalcMind )
        //        tt = sa.CalculatingMindTooltip;
        //    else if( e.Source == lblDeathmark )
        //        tt = sa.DeathmarkTooltip;
        //    else if( e.Source == lblFanat )
        //        tt = sa.FanatacismTooltip;
        //    else if( e.Source == lblLingering )
        //        tt = sa.LingeringNightmaresTooltip;
        //    else if( e.Source == lblCreepDeath )
        //        tt = sa.CreepingDeathTooltip;
        //    else if( e.Source == lblHauntDream )
        //        tt = sa.HauntedDreamsTooltip;
        //    else if( e.Source == lblCreepTerror )
        //        tt = sa.CreepingTerrorTooltip;

        //    setTip( ( Label )e.Source, tt );
        //}

        //private void lblTorment_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.Torment = increasePts( lblTorment, sa.Torment, sa.TormentMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.Torment = decreasePts( lblTorment, sa.Torment, sa.TormentMaxPts );
        //}

        //private void lblHauntingPres_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.HauntingPresence = increasePts( lblHauntingPres, sa.HauntingPresence, sa.HauntingPresenceMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.HauntingPresence = decreasePts( lblHauntingPres, sa.HauntingPresence, sa.HauntingPresenceMaxPts );
        //}

        //private void lblExploitStrike_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.ExploitiveStrikes = increasePts( lblExploitStrike, sa.ExploitiveStrikes, sa.ExploitiveStrikesMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.ExploitiveStrikes = decreasePts( lblExploitStrike, sa.ExploitiveStrikes, sa.ExploitiveStrikesMaxPts );
        //}

        //private void lblChainShock_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.ChainShock = increasePts( lblChainShock, sa.ChainShock, sa.ChainShockMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right && sa.Madness == 0 )
        //        sa.ChainShock = decreasePts( lblChainShock, sa.ChainShock, sa.ChainShockMaxPts );
        //}

        //private void lblSithEff_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.SithEfficacy = increasePts( lblSithEff, sa.SithEfficacy, sa.SithEfficacyMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.SithEfficacy = decreasePts( lblSithEff, sa.SithEfficacy, sa.SithEfficacyMaxPts );
        //}

        //private void lblParasite_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.Parasitism = increasePts( lblParasite, sa.Parasitism, sa.ParasitismMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.Parasitism = decreasePts( lblParasite, sa.Parasitism, sa.ParasitismMaxPts );
        //}

        //private void lblOpress_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.OpressingForce = increasePts( lblOpress, sa.OpressingForce, sa.OpressingForceMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.OpressingForce = decreasePts( lblOpress, sa.OpressingForce, sa.OpressingForceMaxPts );
        //}

        //private void lblMadness_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left && sa.ChainShock == sa.ChainShockMaxPts )
        //        sa.Madness = increasePts( lblMadness, sa.Madness, sa.MadnessMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right && sa.Wrath == 0 )
        //        sa.Madness = decreasePts( lblMadness, sa.Madness, sa.MadnessMaxPts );
        //}

        //private void lblDeathfield_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.DeathField = increasePts( lblDeathfield, sa.DeathField, sa.DeathFieldMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right && sa.Deathmark == 0 )
        //        sa.DeathField = decreasePts( lblDeathfield, sa.DeathField, sa.DeathFieldMaxPts );
        //}

        //private void lblClawDecay_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.ClawsOfDecay = increasePts( lblClawDecay, sa.ClawsOfDecay, sa.ClawsOfDecayMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right && sa.Raze == 0 )
        //        sa.ClawsOfDecay = decreasePts( lblClawDecay, sa.ClawsOfDecay, sa.ClawsOfDecayMaxPts );
        //}

        //private void lblUnearthed_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.UnearthedKnowledge = increasePts( lblUnearthed, sa.UnearthedKnowledge, sa.UnearthedKnowledgeMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.UnearthedKnowledge = decreasePts( lblUnearthed, sa.UnearthedKnowledge, sa.UnearthedKnowledgeMaxPts );
        //}

        //private void lblWrath_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left && sa.Madness == sa.MadnessMaxPts )
        //        sa.Wrath = increasePts( lblWrath, sa.Wrath, sa.WrathMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.Wrath = decreasePts( lblWrath, sa.Wrath, sa.WrathMaxPts );
        //}

        //private void lblRaze_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left && sa.ClawsOfDecay == sa.ClawsOfDecayMaxPts )
        //        sa.Raze = increasePts( lblRaze, sa.Raze, sa.RazeMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right && sa.Fanatacism == 0 )
        //        sa.Raze = decreasePts( lblRaze, sa.Raze, sa.RazeMaxPts );
        //}

        //private void lblDevour_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.Devour = increasePts( lblDevour, sa.Devour, sa.DevourMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.Devour = decreasePts( lblDevour, sa.Devour, sa.DevourMaxPts );
        //}

        //private void lblCalcMind_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left && sa.Deathmark == sa.DeathmarkMaxPts )
        //        sa.CalculatingMind = increasePts( lblCalcMind, sa.CalculatingMind, sa.CalculatingMindMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.CalculatingMind = decreasePts( lblCalcMind, sa.CalculatingMind, sa.CalculatingMindMaxPts );
        //}

        //private void lblDeathmark_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left && sa.DeathField == sa.DeathFieldMaxPts )
        //        sa.Deathmark = increasePts( lblDeathmark, sa.Deathmark, sa.DeathmarkMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right && sa.CalculatingMind == 0 )
        //        sa.Deathmark = decreasePts( lblDeathmark, sa.Deathmark, sa.DeathmarkMaxPts );
        //}

        //private void lblFanat_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left && sa.Raze == sa.RazeMaxPts )
        //        sa.Fanatacism = increasePts( lblFanat, sa.Fanatacism, sa.FanatacismMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.Fanatacism = decreasePts( lblFanat, sa.Fanatacism, sa.FanatacismMaxPts );
        //}

        //private void lblLingering_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.LingeringNightmares = increasePts( lblLingering, sa.LingeringNightmares, sa.LingeringNightmaresMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.LingeringNightmares = decreasePts( lblLingering, sa.LingeringNightmares, sa.LingeringNightmaresMaxPts );
        //}

        //private void lblCreepDeath_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.CreepingDeath = increasePts( lblCreepDeath, sa.CreepingDeath, sa.CreepingDeathMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.CreepingDeath = decreasePts( lblCreepDeath, sa.CreepingDeath, sa.CreepingDeathMaxPts );
        //}

        //private void lblHauntDream_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.HauntedDreams = increasePts( lblHauntDream, sa.HauntedDreams, sa.HauntedDreamsMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.HauntedDreams = decreasePts( lblHauntDream, sa.HauntedDreams, sa.HauntedDreamsMaxPts );
        //}

        //private void lblCreepTerror_Click( object sender, MouseButtonEventArgs e ) {
        //    if( e.ChangedButton == MouseButton.Left )
        //        sa.CreepingTerror = increasePts( lblCreepTerror, sa.CreepingTerror, sa.CreepingTerrorMaxPts );
        //    else if( e.ChangedButton == MouseButton.Right )
        //        sa.CreepingTerror = decreasePts( lblCreepTerror, sa.CreepingTerror, sa.CreepingTerrorMaxPts );
        //}
    }
}
